package com.young.springdemo.service.intandInteger;

/**
 * @program: springdemo
 * @description
 * @author: Young
 * @create: 2020-05-26 16:44
 **/
//@Component
public class intandInteger {

    //        @PostConstruct
    public void test() throws Exception {
        int a = 15;
        int ab = 1555;
        Integer abc = 14;
        int x = a + ab;
        System.out.println(x == 1570);
        System.out.println(abc.getClass().getName());
        Integer abcd = new Integer(14);
        Integer abcde = new Integer(1222);
        int i = 1222;
        Integer xy = 1222;
        Integer y = 12;
        Integer yy = 12;
        System.out.println("Integer 14 = 14" + (abcd == 14));
        System.out.println("Integer 1222 = 1222 " + (abcde == 1222));
        System.out.println("Integer == int " + (abcde == i));
        System.out.println("Integer == Integer  大于127 " + (abcde == xy));
        System.out.println("Integer == Integer  小于127  " + (y == yy));
        System.out.println(abcd + "==" + abcde);
        //验证三元运算的自动拆装箱的NPE
//        Integer xx =null ;
//        int yyy = 15;
//        int zz = xx > yyy ? xx : yyy;
//        System.out.println(zz);

    }
}
